package com.jurenzhao.partssystem.business.order_enterprise.service;


import com.jurenzhao.partssystem.business.order_enterprise.dao.SaleOrderMapper;
import com.jurenzhao.partssystem.business.order_enterprise.entity.SaleOrder;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SaleOrderService {

    @Resource
    private SaleOrderMapper saleOrderMapper;

    public List<SaleOrder> list(){
        return saleOrderMapper.findAll();
    }

    public void delete(String orderId){
        saleOrderMapper.deleteByPrimaryKey(orderId);
    }

    public void save(SaleOrder saleOrder){
        saleOrderMapper.insertSelective(saleOrder);
    }

    public SaleOrder selectByPrimaryKey(String orderId){
        return saleOrderMapper.selectByPrimaryKey(orderId);
    }
}
